Various hierarchy for configuring matplotlib:

  1. functions in current python code
  2. matplotlibrc in current directory
  3. user's matplotlibrc
  4. global matplotlibrc

User's config is $HOME/.matplotlib/matplotlibrc

emacs needs to be put in python-mode to do syntax highlighting properly


In [ ]:
%pylab notebook
import matplotlib as mpl
mpl.rcParams['lines.color']

In [ ]:
import matplotlib.pyplot as plt

In [ ]:
plt.plot([1,3,5,3])

In [ ]:
mpl.rcParams['lines.color'] = u'r'

In [ ]:
mpl.rcParams['lines.color']

In [ ]:
plt.plot([2,3,5,6])

In [ ]:
plt.plot([3,4,5])

In [ ]:
mpl.rcParams['lines.linewidth'] = 4.0

In [ ]:
plt.show()

In [ ]:
plt.plot([5,4,3])

In [ ]: